package dk.service;

import java.util.Date;

import javax.servlet.http.HttpServletRequest;

import org.apache.ibatis.annotations.Select;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import com.ReturnData.ResponseData;
import com.beans.Datelist;
import com.beans.Examlist;
@Service
@FeignClient(value="Dk-API")
public interface ApiService {
		@PostMapping(value="/GetLoginConfigByAdminToken")
		public ResponseData GetLoginConfigByAdminToken(@RequestParam(name="AdminToken")String AdminToken);
		@PostMapping(value="/GetTokenByNameAndPassword")
		public ResponseData GetTokenByNameAndPassword(@RequestParam(name="username")String username,@RequestParam(name="password")String password);
	    @PostMapping(value="/GetMenu")
	    public ResponseData GetMenu(@RequestParam(name="token") String token);
	    @PostMapping(value="/GetExamList")
	    public ResponseData GetExamList();
	    @PostMapping(value="/GetSubject")
	    public ResponseData GetSubject();
	    @PostMapping(value="/AddExamList")
	    
	    public ResponseData AddExamList(
	    		@RequestParam(name="answer")String answer,
	    		@RequestParam(name="difficulty")Integer difficulty,
	    		@RequestParam(name="optiona")String optiona,
	    		@RequestParam(name="optionb")String optionb,
	    		@RequestParam(name="optionc")String optionc,
	    		@RequestParam(name="optiond")String optiond,
	    		@RequestParam(name="parse")String parse,
	    		@RequestParam(name="scorce")Integer scorce,
	    		@RequestParam(name="subjectid")Integer subjectid,
	    		@RequestParam(name="title")String title,
	    		@RequestParam(name="type")Integer type
	    		);
	    @PostMapping(value = "SearchExamlistBySubjectName")
	    public ResponseData SearchExamlistBySubjectID(@RequestParam(name="subjectname")String subjectname);
	    @PostMapping(value = "SearchExamListByExamListTitle")
	    public ResponseData SearchExamListByExamListTitle(@RequestParam(name="ExamListTitle")String examListTitle);
	    @PostMapping(value = "SearchExamListByPage")
	    public ResponseData SearchExamListByPage(@RequestParam(name="pagenum")Integer pagenum, @RequestParam(name="count")Integer count);
		@PostMapping(value = "GetExamListById")
	    public ResponseData GetExamListByid(@RequestParam(name="id")Integer id);
		@PostMapping(value = "UpdateExamListById")
		public ResponseData UpdateExamListById(
				@RequestParam(name="id")Integer id,
				@RequestParam(name="answer")String answer,
	    		@RequestParam(name="difficulty")Integer difficulty,
	    		@RequestParam(name="optiona")String optiona,
	    		@RequestParam(name="optionb")String optionb,
	    		@RequestParam(name="optionc")String optionc,
	    		@RequestParam(name="optiond")String optiond,
	    		@RequestParam(name="parse")String parse,
	    		@RequestParam(name="scorce")Integer scorce,
	    		@RequestParam(name="subjectid")Integer subjectid,
	    		@RequestParam(name="title")String title,
	    		@RequestParam(name="type")Integer type);
		@PostMapping(value = "DeleteExamListByid")
		public ResponseData DeleteExamListByid(@RequestParam(name="id")Integer id);
		@PostMapping(value = "GetExamListEchart")
		public ResponseData GetExamListEchart();
		@PostMapping(value = "GetSubjectByPage")
		public ResponseData GetSubjectByPage(@RequestParam(name="pagenum")Integer pagenum, @RequestParam(name="count") Integer count);
	    @PostMapping(value = "GetSubjectCount" )
	    public ResponseData GetSubjectCount() ;
	    @PostMapping(value = "AddSubject")
		public ResponseData AddSubject(@RequestParam(name="name") String name);
		@PostMapping(value = "SearchSubjectListBySubjectNameByPage")
	    public ResponseData SearchSubjectListBySubjectNameByPage(@RequestParam(name="name") String name, @RequestParam(name="pagenum") Integer pagenum, @RequestParam(name="count") Integer count);
		@PostMapping(value = "DeleteSubjectListById")
		public ResponseData DeleteSubjectListById(@RequestParam(name="id")Integer id);
		@PostMapping(value = "GetSubjectById")
		public ResponseData GetSubjectById(@RequestParam(name = "id")Integer id);
		@PostMapping(value = "UploadSubjectImgById", produces = {MediaType.APPLICATION_JSON_UTF8_VALUE},consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
		public ResponseData UploadSubjectImgById(@RequestParam(name = "id")Integer id,  @RequestPart(value="file")MultipartFile file);
		@PostMapping(value = "EditSubjectByid")
		public ResponseData EditSubjectByid(@RequestParam(name = "id")Integer id, @RequestParam(name = "url")String url, @RequestParam(name = "name")String name);
		@PostMapping(value = "CreateOptionExampleExcel")
		public ResponseData CreateOptionExampleExcel();
		@PostMapping(value = "GetOptionExamListByExcel", produces = {MediaType.APPLICATION_JSON_UTF8_VALUE},consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
		public ResponseData GetOptionExamListByExcel(@RequestPart(value="file")MultipartFile file);
		@PostMapping(value = "BatchAddOptionExamList",consumes = "application/json")
		public ResponseData BatchAddOptionExamList(@RequestPart(value="examliststr")String examliststr);
		@PostMapping(value = "CreateShortAnswerExamlist")
		public ResponseData CreateShortAnswerExamlist();
		@PostMapping(value = "GetShortAnswerExamListByExcel", produces = {MediaType.APPLICATION_JSON_UTF8_VALUE},consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
		public ResponseData GetShortAnswerExamListByExcel(MultipartFile file);
		@PostMapping(value = "BatchAddShortAnswerExamList",consumes = "application/json")	
		public ResponseData BatchAddShortAnswerExamList(@RequestPart(value="examliststr")String examliststr);
		@PostMapping(value = "ChangePasswordByToken")
		public ResponseData ChangePasswordByToken(@RequestParam(name="oldpassword")String oldpassword, @RequestParam(name="newpassword")String newpassword);
		@PostMapping(value = "GetNoticeByPage")
		public ResponseData GetNoticeByPage(@RequestParam(name="pagenum")Integer pagenum, @RequestParam(name="count")Integer count);
		@PostMapping(value = "SearchNoticeByTitle")
		public ResponseData SearchNoticeByTitle(@RequestParam(name="title")String title, @RequestParam(name="pagenum")Integer pagenum, @RequestParam(name="count")Integer count);
		@PostMapping(value = "AddNotice")
		public ResponseData AddNotice(@RequestParam(name="title")String title, @RequestParam(name="content")String content);
		@PostMapping(value = "GetNoticeByid")
		public ResponseData GetNoticeByid(@RequestParam(name="id")Integer id);
		@PostMapping(value = "EditNoticeByid")
		public ResponseData EditNoticeByid(@RequestParam(name="title")String title, @RequestParam(name="content")String content, @RequestParam(name="id")Integer id);
		@PostMapping(value = "DeleteNoticeByid")
		public ResponseData DeleteNoticeByid(@RequestParam(name="id")Integer id);
		@PostMapping(value = "GetDateListByDate")
		public ResponseData GetDateListByDate(
				@RequestParam(name="StartTimeYear")String startTimeYear,
				@RequestParam(name="StartTimeMonth")String startTimeMonth,
				@RequestParam(name="StartTimeDay") String startTimeDay,
				@RequestParam(name="EndTimeYear")String endTimeYear,
				@RequestParam(name="EndTimeMonth")String endTimeMonth, 
				@RequestParam(name="EndTimeDay")String endTimeDay);
		@PostMapping(value = "DeleteDateListById")
		public ResponseData DeleteDateListById(@RequestParam(name="id")Integer id);
		@PostMapping(value = "GetDateListById")
		public ResponseData GetDateListById(@RequestParam(name="id")Integer id);
		@PostMapping(value = "UpdateDateListById")
		public ResponseData UpdateDateListById(@RequestParam(name="title")String title, @RequestParam(name="content")String content,@RequestParam(name="level") Integer level, @RequestParam(name="runtime")String runtime, @RequestParam(name="id")Integer id);
		@PostMapping(value = "InsertDateList")
		public ResponseData InsertDateList(@RequestParam(name="title")String title, 
				@RequestParam(name="content")String content,
				@RequestParam(name="level") Integer level, 
				@RequestParam(name="year")String year,
				@RequestParam(name="month")String month,
				@RequestParam(name="day")String day);
		@PostMapping(value = "GenerateExamList")
		public ResponseData GenerateExamList(@RequestParam(name="TotalScore")Integer totalScore,@RequestParam(name="OptionNum") Integer optionNum, @RequestParam(name="ShortAnswerNum")Integer shortAnswerNum);
		@PostMapping(value = "GetStudentListByPage")
		public ResponseData GetStudentListByPage(@RequestParam(name="pagenum")Integer pagenum,@RequestParam(name="count")Integer count,@RequestParam(name="stuname")String stuname);
		@PostMapping(value = "GetStudentListById")
		public ResponseData GetStudentListById(@RequestParam(name = "id")Integer id);
		@PostMapping(value = "EditStudentListById")
		public ResponseData EditStudentListById(@RequestPart(value="studentstr")String studentstr);
		@PostMapping(value = "DelStudentListById")
		public ResponseData DelStudentListById(@RequestParam(name = "id")Integer id);
		@PostMapping(value = "GetRequestLogByPage")
		public ResponseData GetRequestLogByPage(@RequestParam(name = "pagenum")Integer pagenum, @RequestParam(name = "count")Integer count);
		@PostMapping(value = "GetAllCount")
		public ResponseData GetAllCount();
		@PostMapping(value = "SendMes")
		public ResponseData SendMes(@RequestParam(name = "phone")String phone);
		@PostMapping(value = "StuLogin")
		public ResponseData StuLogin(@RequestParam(name = "phone")String phone, @RequestParam(name = "code")String code, @RequestParam(name = "UUidcode")String UUidcode,@RequestParam(name = "password") String password);
		@PostMapping("StuChangePassword")
		public ResponseData StuChangePassword(@RequestParam(name = "oldpassword")String oldpassword, @RequestParam(name = "newpassword")String newpassword, @RequestParam(name = "id")Integer id);
		@PostMapping("GetExamListByStudent")
		public ResponseData StuGetExamlist(@RequestParam(name = "Subjectid")Integer Subjectid, @RequestParam(name = "OptionExamNum")Integer OptionExamNum, @RequestParam(name = "ShortAnswerExamNum")Integer ShortAnswerExamNum,
				@RequestParam(name = "studentid")Integer Studentid);
		
		
}
